package com.wang.article.feign;

import com.wang.article.api.client.ArticleClient;
import com.wang.article.api.model.dto.ArticleDto;
import com.wang.article.service.IArticleService;
import com.wang.common.model.dto.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ArticleClientImpl implements ArticleClient {

    @Autowired
    private IArticleService articleService;

    @PostMapping("/api/v1/article/save")
    @Override
    public ResponseResult saveArticle(ArticleDto articleDto) {
        return articleService.saveArticle(articleDto);
    }
}
